#include<stdio.h>
#include<math.h>
int reverse(int n){
	int i=1,sum=0,a;
	if(n<0){
		n=fabs(n);
		i=-1;
	}
	while(n){
		a=n%10;
		sum=sum*10+a;
		n=n/10; 
	}
	sum=sum*i;
	return sum;
}
int main(){
	int n;
	scanf("%d",&n);
	printf("%d",reverse(n));
	return 0;
}
